import { IsString, Matches, MinLength, MaxLength } from 'class-validator';

export class LoginDto {
  @IsString()
  @MinLength(4)
  username: string;

  @IsString()
  @Matches(/^\S*(?=\S{6})(?=\S*\d)(?=\S*[A-Z])\S*$/i)
  @MinLength(6)
  password: string;
  @IsString()
  captchaId: string;

  @IsString()
  @MinLength(4)
  @MaxLength(4)
  verifyCode: string;
}
